Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpaceEye - Adjusting reading windows for chips that fall close to the raster's boarder #183

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

rafaspadilha
Copy link
Contributor

@rafaspadilha rafaspadilha commented Jul 30, 2024

In the SpaceEye workflow, if the input geometry yields a window that is smaller than the chip size, we adjust it by splitting the difference between the chip's and window's width (height) half way to the right/left (top/bottom) sides of the original window. However if the input geometry falls close to the border of the raster, we might not be able to completely increase the window in one of the sides and end up with a window smaller than the chip size. Because of that, the workflow fails with "dim_size cannot be smaller than chip_size. Please consider reducing the step/chip size or increasing the input geometry."

This PR updates the _adjust_roi_window method, so the window is adjusted from both sides until reaching the chip size or reaching the border of the raster.

This fixes #180.

Copy link
Contributor

@robertomest robertomest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafaspadilha rafaspadilha merged commit 2fa6555 into dev Aug 1, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants